///////////////////////////////////////////////////////////
// 
//  MyShape.h
// 
//  Authors:  Jeremy Bennett
//
///////////////////////////////////////////////////////////

#ifndef _MYSHAPE_H_ 
#define _MYSHAPE_H_

// Local Includes

// SDL Includes

// Bullet Includes
#include <BulletDynamics/Dynamics/btRigidBody.h>

// System Includes

// Forward Declarations
class MyContext;

// 
typedef enum {
    // Non-Pickable Shapes
    my_unknown  = 0,
    my_box      = 1,
    // Pickable Shapes
    my_sphere   = 2,
    my_cylinder = 3,
    my_square   = 4,
    my_triangle = 5,
    my_retangle = 6,
    my_stick    = 7,
    my_ooze     = 8
} MyShapeType;

// Abstract class for rendering method
class MyShape : public btRigidBody
{
#define PI 3.141592653589793238f

  public:
    MyShape();
    ~MyShape();

    void setColor( const btVector4 &col ) { _vCol = col;  }
	btVector4& getColor()                 { return _vCol; }

	btCollisionShape* getCollisionShape() const { return _pShp; }

    MyShapeType type() { return _eType; }

    void setIsPicked( bool bPick ) { _bIsPicked = bPick; }
    bool isPicked()                { return _bIsPicked;  }

    virtual bool render( MyContext *ctx ) = 0;

  protected:
    MyShapeType           _eType;
    btVector4             _vCol;
    btCollisionShape*     _pShp;

    // 
    bool                  _bIsPicked;
};

#endif //_MYSHAPE_H_